<?php
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/logic/CustomCommand.php';
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/model/factory/DaoFactory.php';
	
	error_reporting (E_ALL ^ E_NOTICE);
	

	
	/*
	* Class to validate a credential
	*/
	class CommandChangeBill extends CustomCommand {
		/*
		* Constructor of the class
		*/
			public function __construct ($pkNumber, $pkControlNumber, $date, $tax, 
			$fkIdNumberNaturalCustomer, $fkRifLegalClient) {
			$this -> pkNumber = $pkNumber;
			$this -> date = $date;
			$this -> tax = $tax;
			$this -> fkIdNumberNaturalCustomer = $fkIdNumberNaturalCustomer;
			$this -> fkRifLegalClient = $fkRifLegalClient;	
	
		
		}
		
		/*
		* Method to execute to validate the credential
		*/
		public function execute() {

			$daoFactory= DaoFactory:: getMySqlDaoFactory();
			$iuad= $daoFactory-> getMySqlBillAccessDao();					
			$auth=$iuad->changeBill($this -> pkNumber,$this -> date,$this -> tax,$this -> fkIdNumberNaturalCustomer ,$this -> fkRifLegalClient );
			
	
			$this -> result = $auth;
		}
	}
?>